package at.fhj.itm10.ticketmaster.beans;

import java.util.Date;
import javax.annotation.PostConstruct;
import at.fhj.itm10.ticketmaster.dao.DAOException;
import at.fhj.itm10.ticketmaster.entities.Address;
import at.fhj.itm10.ticketmaster.entities.Customer;
import at.fhj.itm10.ticketmaster.services.AddressService;
import at.fhj.itm10.ticketmaster.services.CustomerService;
import at.fhj.itm10.ticketmaster.services.ServiceFactory;

/**
 * Register bean.
 * 
 * @author Sabrina Gruber
 * @author Tammo Boehme
 */

public class RegisterBean {
	private CustomerService customerService;
			
	public RegisterBean(){
		init();
	}
	
	@PostConstruct
	private void init() {
		try {
			// getDAO
			ServiceFactory factory = new ServiceFactory();
			customerService = factory.getCustomerService();
			factory.getAddressService();
			
		} catch (DAOException e) {
			e.printStackTrace();
		}
		
	}
	
	public String register() throws Exception{
		return customerService.register();		
	}
	
	public String getAgbText(){
		return customerService.getAgbText();
		
	}

	public String getImpressumText(){
		return customerService.getImpressumText();
		
	}

	public Customer getCustomer() {
		return customerService.getCustomer();
	}

	public void setCustomer(Customer customer) {
		customerService.setCustomer(customer);
	}

	public boolean getisPromoter() {
		return customerService.getisPromoter();
	}

	public void setIsPromoter(boolean isPromoter) {
		customerService.setIsPromoter(isPromoter);
	}
	public String getTitle() {
		return customerService.getTitle();
	}

	public void setTitle(String title) {
		customerService.setTitle(title);
	}

	public String getName() {
		return customerService.getName();
	}

	public void setName(String name) {
		customerService.setName(name);
	}

	public String getLastName() {
		return customerService.getLastName();
	}

	public void setLastName(String lastName) {
		customerService.setLastName(lastName);
	}

	public String getUserName() {
		return customerService.getUserName();
	}

	public void setUserName(String userName) {
		customerService.setUserName(userName);
	}

	public String getEmail() {
		return customerService.getEmail();
	}

	public void setEmail(String email) {
		customerService.setEmail(email);
	}

	public String getPassword() {
		return customerService.getPassword();
	}

	public void setPassword(String password) {
		customerService.setPassword(password);
	}

	public boolean getGender() {
		return customerService.getGender();
	}

	public void setGender(boolean gender) {
		customerService.getGender();
	}

	public long getAdressId() {
		return customerService.getAdressId();
	}

	public void setAdressId(long adressId) {
		customerService.setAdressId(adressId);
	}

	public boolean isNewsletter() {
		return customerService.isNewsletter();
	}

	public void setNewsletter(boolean newsletter) {
		customerService.setNewsletter(newsletter);
	}

	public Date getBirth() {
		return customerService.getBirth();
	}

	public void setBirth(Date birth) {
		customerService.setBirth(birth);
	}

	public String getSecpassword() {
		return customerService.getSecpassword();
	}

	public void setSecpassword(String secpassword) {
		customerService.setSecpassword(secpassword);
	}
	public Address getAddress() {
		return customerService.getAddress();
	}

	public void setAddress(Address address) {
		customerService.setAddress(address);
	}

	public String getAddressName() {
		return customerService.getAddressName();
	}

	public void setAddressName(String addressName) {
		customerService.setAddressName(addressName);
	}

	public String getStreet() {
		return customerService.getStreet();
	}

	public void setStreet(String street) {
		customerService.setStreet(street);
	}

	public String getZip() {
		return customerService.getZip();
	}

	public void setZip(String zip) {
		customerService.setZip(zip);
	}

	public String getCity() {
		return customerService.getCity();
	}

	public void setCity(String city) {
		customerService.setCity(city);
	}

	public String getCountry() {
		return customerService.getCountry();
	}

	public void setCountry(String country) {
		customerService.setCountry(country);
	}

	public Date getRegisterDate() {
		return customerService.getRegisterDate();
	}

	public void setRegisterDate(Date registerDate) {
		customerService.setRegisterDate(registerDate);
	}

	public boolean isAgb() {
		return customerService.isAgb();
	}

	public void setAgb(boolean agb) {
		customerService.setAgb(agb);
	}

	public boolean isImpressum() {
		return customerService.isImpressum();
	}

	public void setImpressum(boolean impressum) {
		customerService.setImpressum(impressum);
	}
	
}
